<?php
/*
Module Group: mall
Module Group Name: 微商城
Description: 微商城用于购物
Version: 1.0
Iconurl: http://www.happyidea.com.cn/resource/wx_icon/default.png
Author: holiny
Modules: mall
Display: 1
*/

class personCenterModule extends Module {
	
	/*
	 * 在构造函数中装载所依赖的类或其他文件
	*/
	function __construct() {
		$this->includePhp('personCenter', 'personCenter');
	}
	/*
	 * 调用插件资源
	*/
	public function call($user, $method, $param) {
		switch ($method) {
			case 'index':
				personCenter::index($param);
				break;
			case 'userInfo':
				personCenter::getUserInfo($param);
				break;
			case 'saveUserInfo':
				$phone=$param->phone;
				$fullName=$param->fullName;
				personCenter::saveUserInfo($fullName,$phone);
				break;
			case 'login':
				personCenter::login($param);
				break;
			case 'sendPhoneCode':
				personCenter::sendPhoneCode($param);
				break;
			case 'phoneLogin':
				personCenter::phoneLogin($param);
				break;
			case 'changeName':
				personCenter::changeName($param);
				break;
			case 'changePhone':
				personCenter::changePhone($param);
				break;
			case 'changePassword':
				personCenter::changePassword($param);
				break;
			case 'forgotPassword':
				personCenter::forgotPassword($param);
				break;
			case 'register':
				personCenter::register($param);
				break;
			case 'verifyPhone':
				personCenter::verifyPhone($param);
				break;
			case 'resetPassword':
				personCenter::resetPassword($param);
				break;
			case 'verifyToken':
				personCenter::verifyToken($param);
				break;
			case 'recommenderUserList':
				$uid = $param->uid;
				$qid = $param->qid;
				$search = $param->search;
				$start = $param->start;
				$limit = $param->limit;
				$tpl = $param->tpl;
				$register = $param->register;
				personCenter::recommenderUserList($search, $start, $limit, $tpl, $register);
				break;
            case 'logout':
                personCenter::logout();
                break;
		}
	}
}


$module = new personCenterModule();
Module::addModule($module);